package com.kevin.j2eeToolBox.patterns.observer;

import java.util.Observable;
import java.util.Observer;

public class Observer1 implements Observer {

	private int age = 10;

	/**
	 * @return the age
	 */
	public int getAge() {
		return age;
	}

	/**
	 * @param age
	 *            the age to set
	 */
	public void setAge(int age) {
		this.age = age;
	}

	@Override
	public void update(Observable o, Object arg) {

		this.age += (Integer) arg;

		System.out.println("Observer1 age =" + this.age);

	}

}
